import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import * as ElIconModules from '@element-plus/icons-vue' //导入 ElementPlus 组件库中的所有图标
import 'element-plus/dist/index.css'
import router from './router'

import { createPinia } from 'pinia'
const app  = createApp(App);
app.use(ElementPlus); //挂载ElementPlus
// 统一注册Icon图标
for (const iconName in ElIconModules) {
   if (Reflect.has(ElIconModules, iconName)) {
     const item = ElIconModules[iconName]
     app.component(iconName, item)
   }
 }
app.use(createPinia());
app.use().use(router);
app.mount('#app')
